home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / gfx / xfig7.lha / xfig / README < prev    next >
Text File  |  1995-08-22  |  14KB  |  329 lines

  1. ===============================================================
  2. XFIG - Facility for Interactive Generation of figures under X11
  3. ===============================================================
  4.  
  5.  
  6. Xfig is a menu-driven tool that allows the user to draw and manipulate objects
  7. interactively in an X window.  The resulting pictures can be saved, printed
  8. on postscript printers or converted to a variety of other formats (e.g. to
  9. allow inclusion in LaTeX documents).
  10.  
  11. This file contains some notes about installing xfig, the directory
  12. 'Examples' contains some example figures and the 'Doc' directory contains
  13. some further documentation including the manual in troff -man format
  14. and PostScript.
  15.  
  16. ***************************************************************************
  17. Please refer any questions/bug fixes/contributions etc. about TransFig or 
  18. xfig to me.
  19.  
  20. Brian Smith
  21. Lawrence Berkeley National Laboratory
  22. bvsmith@lbl.gov
  23. ***************************************************************************
  24.  
  25. Note that although I work at Lawrence Berkeley National Laboratory (LBNL)
  26. I don't speak for LBNL nor do I represent LBNL with respect to my work on
  27. TransFig and xfig, nor does LBL make any representations about the suitability
  28. of this software for any purpose.
  29.  
  30. Here is the legal part:
  31.  
  32. THE LAWRENCE BERKELEY NATIONAL LABORATORY DISCLAIMS ALL WARRANTIES WITH REGARD
  33. TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  34. FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  35. CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  36. DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
  37. ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  38. SOFTWARE.
  39. ______________________________________________________________________________
  40.  
  41. NOTE 1: Because Unisys has stated that they will not charge royalties for the
  42.     use of the LZW compression algorithm in FREE programs, xfig will
  43.     continue to support importing and exporting of GIF images.
  44.     However, be aware that if you sell xfig, for example as part of
  45.     a CD-ROM package with freeware, you may be liable for paying royalties
  46.     to Unisys.
  47.     The authors of xfig and the Lawrence Berkeley Laboratory cannot be held
  48.     responsible in any case.
  49.  
  50. NOTE 2: Because of the patent/licensing issue with Unisys and the LZW compression
  51.     algorithm used in GIF files, the author of Ghostscript has decided to
  52.     remove GIF support from that program.
  53.     xfig will now use PCX output from Ghostscript when importing EPS files.
  54.     This means that you must compile Ghostscript with the pcx256 and pbmraw
  55.     drivers.
  56.     Additionally, there is a bug in the pcx driver in Aladdin Ghostscript
  57.     versions prior to 3.32, which writes an incorrect pcx file for images
  58.     with odd width (not even).  There is a compile-time flag called PCXBUG
  59.     set (the default) in the Imakefile to make xfig add one pixel to the
  60.     width of an odd-width image when it reads in the pcx output from
  61.     Ghostscript.
  62.     If you have Aladdin Ghostscript 3.32 or newer (which wasn't released
  63.     as of this writing) you may comment out that flag and your images will
  64.     have the proper width.  However, one pixel extra in width shouldn't
  65.     matter for most imported eps files.
  66.  
  67. ++++++++++++++++++++++
  68. NOTE about version 3.0
  69.  
  70.   An error in version 3.0 incorrectly positioned objects on the canvas
  71.   when reading older fig files.  New objects entered with 3.0 are
  72.   correctly positioned.  A warning will popup when you load a version 3.0
  73.   file with version 3.1 that says you might need to offset your figure by
  74.   14 fig units in X and Y when you load it.  This is done by setting the
  75.   X and Y offset in the popup File panel.
  76.   I apologize for the inconvenience.
  77.  
  78.   This is also why the file version number has changed.
  79.  
  80. ++++++++++++++++++++++
  81.  
  82. ===================
  83. INSTALLATION NOTES:
  84. ===================
  85.  
  86. 1. Edit the Imakefile if you need to customize it (see following notes).
  87.     For a 3D look, see NOTE below.
  88.     If you already have the jpeg library on your system uncomment
  89.     the "#define USEINSTALLEDJPEG" line in the Imakefile.
  90.     You must have version 5b or newer of the jpeg library.
  91. 2. Type "xmkmf" to create the Makefile from the Imakefile.
  92. 3. Type "make"         (**** This MUST be done before "make install" ****).
  93.     Note: The "configure" script will be automatically run in the jpeg
  94.     directory if you are using the jpeg library supplied with xfig.
  95.     This will create the Makefile in that directory from your system
  96.     configuration.  
  97. 4. Type "make install"
  98.     If you don't do this step, be sure to install the app-defaults files
  99.     Fig.ad and Fig-color.ad and the CompKeyDB file in the directory
  100.     specified by XFIGLIBDIR (default: /usr/local/lib/X11/xfig).
  101. 5. Type "make install.man".
  102. 6. For X11R5 and later color implementations, specify "*customization: -color"
  103.     in your .Xdefaults or .Xresources file.
  104.     NOTE: this only works under X11R5 and later.
  105.  
  106. If you have the XPM3 package (X11 color pixmaps) you can export your figures
  107.    in that format.  Also, you can import xpm files as picture objects.
  108.    Uncomment the XPMDEFINES and related variables in the Imakefile in that case.
  109.    You need version 3.4c or newer.  This is available from ftp.x.org in
  110.    /contrib/libraries.
  111. If you have Ghostscript, enable the -DGSBIT flag in the Imakefile and xfig will
  112.    attempt to use it to interpret any encapsulated Postscript (EPS) files you
  113.    import.  Ghostscript must be compiled with with the "pcx256" and "pbmraw"
  114.    drivers.  The pbm driver is used when you run xfig on a monochrome display
  115.    and the pcx256 driver is used on a color display.
  116.    See NOTE 2 above about the pcx driver in Ghostscript.
  117. If your system doesn't have strstr(), add the flag -DNOSTRSTR in the Imakefile
  118.    in the DEFINES line.
  119. If your system doesn't have strcasecmp() and/or strncasecmp(), uncomment the
  120.    lines in the Imakefile with HAVE_NO_STRCASECMP and HAVE_NO_STRNCASECMP.
  121. If you have an input tablet and your X server supports the XInputExtension
  122.    uncomment the lines that define TABLIB and USETAB in the Imakefile.
  123.    Start xfig with -tablet or define the resource Fig.Tablet to use it.
  124.  
  125. NOTE:    For a 3D look, I recommend using Kaleb Keithley's 3D Athena Widget set,
  126.     a direct replacement for the Xaw library.  After you compile and install that
  127.     package, and after step 1 above, just uncomment the definition of XAWLIB in
  128.     the Imakefile and it will use the 3D widget set.
  129.     This set is available from ftp.x.org.
  130.  
  131. NOTE:    The Display PostScript code is not supported anymore until some kind
  132.     user can debug it for me, as I have no access to a server with DPS
  133.     extensions.  Use Ghostscript for rendering your EPS files.  It gives
  134.     a color image on the xfig canvas now anyway.
  135.  
  136. The maximum width of the top ruler is set to 1020 pixels and the height of the
  137. side ruler to 860 pixels.  If your server can handle pixmaps larger than this
  138. and you need longer/taller rulers, you may set the maximum allowed in your
  139. Imakefile with -DMAX_TOPRULER_WD=1160 (or whatever value you wish) and 
  140. -DMAX_SIDERULER_HT=1024 (or whatever value you wish).
  141.  
  142. The SMOOTHMOTION option toggles between two methods for tracking the
  143. cursor.  The first way (SMOOTHMOTION) just uses the (x,y) information given
  144. in the X pointer motion event.  If your display server doesn't implement
  145. motion compression this is very slow for large movements of the mouse
  146. pointer because X sends back lots of small movement events, each of which
  147. causes the rubberband box to be erased and redrawn.  The alternative
  148. way (not SMOOTHMOTION) queries the position of the X cursor whenever
  149. a motion event is received and if you make a large movement and then
  150. stop actually turns out to involve less work even though the XQueryPointer
  151. call is quite slow.
  152.  
  153. The SMOOTHMOTION flag MIGHT be necessary for older versions of OpenWindows on
  154. certain machines if the performance is slow when moving or drawing objects.
  155.  
  156. The pattern shading (e.g. bricks, shingles, etc.) only work for PostScript,
  157. GIF, JPEG, XPM and X11 Bitmap output.
  158.  
  159. Unless you have an image (picture object) in your figure, you may not gain
  160. very much by exporting in JPEG over GIF because of the nature of compression
  161. used in both methods.  GIF is usually better for line drawings or drawings
  162. with large blocks of continuous color (e.g. filled polygons).  JPEG is usually
  163. better for compressing images.
  164.  
  165. ----------------------
  166. Printing your figures:
  167. ----------------------
  168.  
  169. The program to translate your figure into one of many printer languages
  170. (Postscript, LaTex, etc) is called fig2dev and is part of the TransFig
  171. package put together by Micah Beck and maintained by Brian Smith.
  172. It is available from ftp.x.org in /contrib/applications/drawing_tools/transfig.
  173. See the man pages for more information.
  174.  
  175. If you have a SYSV system but use BSD-style printing (lpr instead of lp) you
  176. must define -DBSDLPR in the Imakefile/Makefile.
  177.  
  178. You may also need to uncomment the following string in the Fig.ad
  179. app-defaults file:
  180.  
  181. !Fig*job_params*string:        -T PS
  182.  
  183. -------------
  184. Solaris users
  185. -------------
  186.  
  187. You should have:
  188.  
  189. #define SystemV YES
  190. #define SystemV4 YES
  191.  
  192. in your imake machine config file (usually in /usr/lib/X11/config or something
  193. like that).
  194.  
  195. Add "-lc" to the LOCAL_LIBRARIES variable in the Imakefile to link with 
  196. /usr/lib/libc for the directory operations.
  197.  
  198. Some people have had trouble with the Sun cc 3.0.1 compiler and optimization.
  199. You may need to shut off optimization.
  200. A common symptom is that xfig just core dumps when starting.
  201.  
  202. -------------
  203. XFree86 Users
  204. -------------
  205.  
  206. Version 3.1 of XFree86 causes problems.  Get version 3.1.1 or newer.
  207.  
  208. ----------------------------------------------
  209. Possible problems encountered installing xfig:
  210. ----------------------------------------------
  211.  
  212. PROBLEM:
  213.     When using LaTeX fonts in Xfig I always end up with postscript
  214.     fonts instead rather than, say, Computer Modern. 
  215.  
  216. POSSIBLE CAUSE AND SOLUTION:
  217.     To put fonts under the control of LaTeX when generating PS, you must
  218.     tag the text object as "special" and then use the pstex output mode.
  219.     This mode forces special text objects to be passed through to LaTeX,
  220.     allowing the use of Math mode and CM fonts among other things.
  221. ________________________________________________________________________________
  222. PROBLEM:
  223.     On a DEC Alpha the compiler may complain about something like: ".mask
  224.     must have pcreg from .frame set if any bits are set in .mask or .fmask"
  225.     in the file u_bound.c.
  226.  
  227. POSSIBLE CAUSE AND SOLUTION:
  228.     Set the optimization level to -O1 at least for that file.
  229. ________________________________________________________________________________
  230. PROBLEM:
  231.     On Sun machines the linker may give erroneous error messages about 
  232.     the following symbols being undefined:
  233.  
  234.     ld: Undefined symbol
  235.        _get_applicationShellWidgetClass
  236.        _get_wmShellWidgetClass
  237.  
  238.     This may be ignored as it is a problem with the Sun shared libraries
  239.     and the way X11 builds the shared Xmu library.  It doesn't affect the
  240.     operation of xfig.
  241.  
  242.     Or you may compile with "-Bstatic -lXmu -Bdynamic".
  243.     To really solve the problem if you are using OpenWindows 3.0
  244.     (X11R4-based Xt), please contact your local Sun office and request the
  245.     following patches:
  246.  
  247.         Patch i.d.      Description
  248.         100512-02       4.1.x OpenWindows 3.0 libXt Jumbo patch
  249.         100573-03       4.1.x OpenWindows 3.0 undefined symbols when using
  250.                                 shared libXmu
  251.  
  252.     A source patch for use with the MIT X11R4 libraries was developed by
  253.     Conrad Kimball (cek@sdc.boeing.com); it retrofits into R4 some fixes
  254.     made in R5 to get around this problem. The patch is on export in [1/93]
  255.     contrib/X11R4_sunos4.1.2_patch_version3.Z".
  256.  
  257.     The other option is to use X11R5 or X11R6.
  258. ________________________________________________________________________________
  259. PROBLEM:
  260.     The window oscillates and fights with the window manager when
  261.     I click on a mode button or try to resize the xfig window.
  262.  
  263. POSSIBLE CAUSE AND SOLUTION:
  264.      Perhaps the following resource has been set
  265.          *allowShellResize: true
  266.     because another program requires it to be true.
  267.     Change the resource to be specific to the programs which need it,
  268.     or set the following resource:
  269.          Fig*allowShellResize: false
  270.     Note: this is in the Fig.ad file that comes with xfig, which is 
  271.           installed when you do a "make install".
  272. ________________________________________________________________________________
  273. PROBLEM:
  274.     Openwindows sometimes loses track of xfig's icon.
  275.  
  276. POSSIBLE CAUSE AND SOLUTION:
  277.     Cause unknown, here is a temporary kludge. Place the line:
  278.         Fig*iconPixmap:               ..../your_lib_area/fig.icon.X
  279.     in your .Xdefaults file and copy fig.icon.X into your lib area.
  280. ________________________________________________________________________________
  281. PROBLEM:
  282.     When compiling on an HP 750 running HP-UX 8.05, the compiler dies with
  283.     a bus error in the file u_undo.c.
  284.  
  285. POSSIBLE CAUSE AND SOLUTION:
  286.     There is a bug in the HP compiler.  Workaround the problem by adding
  287.     an extra statement between two statements in u_undo.c:
  288.  
  289.     Original:
  290.  
  291.     undo_glue()
  292.     {
  293.         list_delete_compound(&objects.compounds, saved_objects.compounds);
  294.         tail(&objects, &object_tails);
  295.  
  296.     New:
  297.  
  298.     undo_glue()
  299.     {
  300.         list_delete_compound(&objects.compounds, saved_objects.compounds);
  301. >>>        /* HP-UX 8.05 compiler bug fix -- don't ask */
  302. >>>        last_action = last_action;
  303.         tail(&objects, &object_tails);
  304. ________________________________________________________________________________
  305. PROBLEM:
  306.     On HP machines, the capitalization of some letters in the text window 
  307.     in the edit popup for text objects are wrong.
  308.  
  309. POSSIBLE CAUSE AND SOLUTION:
  310.     Make sure that the CompKeyDB file has the lowercase letter definitions
  311.     BEFORE the uppercase definitions.  This should be the case for the 
  312.     CompKeyDB file shipped with xfig 2.1.5 and later.
  313. ________________________________________________________________________________
  314. PROBLEM:
  315.     On some HP computers using native cc compiler there is a problem with
  316.     level 3 optimization.
  317.  
  318. POSSIBLE CAUSE AND SOLUTION:
  319.     Use +O2 instead of +O3 or get patch from HP for the compiler from
  320.     http://support.mayfield.hp.com/
  321.     Choose: Patch Browsing and Downloading
  322.  
  323. ________________________________________________________________________________
  324. PROBLEM:
  325.     On Linux machines xfig crashes.
  326.  
  327. POSSIBLE CAUSE AND SOLUTION:
  328.     On linux you need to have gcc version 2.6.2 or newer.
  329.